Use TIFF save options as default for appended images#8974
Closed
jvanderneutstulen wants to merge 2 commits intopython-pillow:mainfrom
Closed
Use TIFF save options as default for appended images#8974jvanderneutstulen wants to merge 2 commits intopython-pillow:mainfrom
jvanderneutstulen wants to merge 2 commits intopython-pillow:mainfrom
Conversation
If no encoderinfo is specified on an appended TIFF image, use the encoder info from the first image. This restores 11.1.0 behavior, while allowing an image specific override.
Member
This PR doesn't make this distinction. If I adjust your code so that diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py
index 35b2aa0e3..2a475910c 100644
--- a/Tests/test_file_tiff.py
+++ b/Tests/test_file_tiff.py
@@ -694,6 +694,7 @@ class TestFileTiff:
assert im.tag_v2[278] == 256
im = hopper()
+ im.encoderinfo = {"tiffinfo": {278: 100}}
im2 = Image.new("L", (128, 128))
im2.encoderinfo = {"tiffinfo": {278: 256}}
im3 = Image.new("L", (128, 128))
@@ -701,7 +702,7 @@ class TestFileTiff:
with Image.open(outfile) as im:
assert isinstance(im, TiffImagePlugin.TiffImageFile)
- assert im.tag_v2[278] == 512
+ assert im.tag_v2[278] == 100
im.seek(1)
assert im.tag_v2[278] == 256the test fails - https://github.com/radarhere/Pillow/actions/runs/15504472075/job/43657452711#step:11:2607 I've created #9001 instead. |
Member
|
Thanks for the PR and issue, #9001 has been merged instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8963. Alternative to #9001
Changes proposed in this pull request: